<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Leave History (Page7)</title>
</head>
<body>
<%@ include file="head.jsp"%>
	<form name="Search" action="./LeaveHistoryForM" method="get">
		<table align="center">
			<tr>
				<td align="center">Name (eg.panji)</td>
				<td align="center">ID</td>
				<td align="center">Application Date From (YYYY-MM-DD)</td>
				<td align="center"></td>
				<td align="center">Application Date TO (YYYY-MM-DD)</td>
				<td align="center"></td>
			</tr>
			<tr>
			<td><c:if test="${flagName}">invalid name</c:if></td>
			<td><c:if test="${flagId}">invalid ID</c:if></td>
			<td><c:if test="${flagYearFrom}">invalid year</c:if><c:if test="${flagMonthFrom}">invalid month</c:if><c:if test="${flagDateFrom}">invalid day</c:if></td>
			<td></td>
			<td><c:if test="${flagYearTo}">invalid year</c:if><c:if test="${flagMonthTo}">invalid month</c:if><c:if test="${flagDateTo}">invalid day</c:if></td>
			<td></td>
			</tr>

			<tr>
				<td><input type="text" name="name" /></td>
				<td><input type="text" name="id"></td>
				<td><input type="text" name="yearFrom"><input
					type="text" name="monthFrom"><input type="text"
					name="dayFrom"></td>
				<td>to</td>
				<td><input type="text" name="yearTo"><input type="text"
					name="monthTo"><input type="text" name="dayTo"></td>
				<td><input type="submit" value="Search"></td>
			</tr>
		</table>
	</form>

 <c:if test="${flagList}">
	<table border="1">
		<tr>
			<td>Name</td>
			<td>Application Date</td>
			<td>Duration</td>
			<td></td>
			<td>Status</td>
		</tr>
		<c:forEach items="${requestScope.LeaveInfo}" var="listSort">
			<tr>
				<td>${listSort._userName}</td>
				<td>${listSort._applicationDate}</td>
				<td>${listSort._duration}</td>
				<td><a href="/CA_Project/ManagerPagePreSet?leaveDetailID=${listSort._leaveID }"> Detail </a></td>
				<td>${listSort._status}</td>
		</c:forEach>
	</table>
	</c:if>
</body>
</html>